import request from "@/utils/request"
import {typeListType} from "./model/courseType"

//请求类型
interface paramsType{
  path:string
}
//视频列表请求类型
interface reqSortAndPathType{
  sortType:string,
  path:string
}
//视频列表请求页码类型
interface reqVideoPageType{
  pageSize:number,
  pageNum:number
}
export default {
  //分类列表请求
  reqTypeList({path}:paramsType){
    return request.get<any,typeListType>(`/apis/moment/properties/filter/${path}?access_token=c494ae44-3adc-48ca-8749-5128a53358d7`)
  },
//  获取视频列表数据的请求
  reqVideList({sortType = 'integrated',path}:reqSortAndPathType,{pageSize=20,pageNum=0}:reqVideoPageType){
    return request.post<any,any>(`/apis/moment/moments/collect/${path}/${sortType}?access_token=c494ae44-3adc-48ca-8749-5128a53358d7&pageSize=${pageSize}&pageNum=${pageNum}`,{})
  }
}
